package com.qf.mapper;

import com.qf.entity.ReserveCar;
import com.qf.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface ReserveCarMapper extends Mapper<ReserveCar> {

    Integer findByInfo(ReserveCar reserveCar);

    Integer save(@Param("startTime")ReserveCar reserveCar);

    @Select("select * from user where classsify_id  = #{roleId}")
    List<User> findUserIdByRoleId(@Param("roleId") Integer roleId);

    @Select("select * from reserve_car where car_id = #{carId}")
    List<ReserveCar> findInfoReserveCar(Integer carId);

    //查询用车申请信息
    ReserveCar findInfo(@Param("taskId") Integer taskId,@Param("eventId") Integer eventId);


    //添加车辆信息
    Integer addReserveCar(ReserveCar reserveCar);
}
